﻿namespace LxBasic
{
    public class Matrix3dMath
    {
        public static Vector3d Product(in DiagonalMatrixR3C3 a, in Vector3d b)
        {
            return new Vector3d(a.a11 * b.X, a.a22 * b.Y, a.a33 * b.Z);
        }
        public static Vector3d Product(in MatrixR3C3 a, in Vector3d b)
        {
            return new Vector3d(
                a.a11 * b.X + a.a12 * b.Y + a.a13 * b.Z,
                a.a21 * b.X + a.a22 * b.Y + a.a23 * b.Z,
                a.a31 * b.X + a.a32 * b.Y + a.a33 * b.Z);
        }
        public static Vector3d Product(in SymMatrixR3C3 a, in Vector3d b)
        {
            return new Vector3d(
                a.a11 * b.X + a.a21 * b.Y + a.a31 * b.Z,
                a.a21 * b.X + a.a22 * b.Y + a.a32 * b.Z,
                a.a31 * b.X + a.a32 * b.Y + a.a33 * b.Z);
        }
    }
}
